package com.learn.file;

import java.io.FileWriter;

public class TestWtirt {
    public static void main(String[] args)throws Exception{
        FileWriter fileWriter = new FileWriter("reader.txt");
        fileWriter.write("hello world");

        char[] charArray = "aaaaaa".toCharArray();
        fileWriter.write(charArray,0,3);

        fileWriter.write(99);

        fileWriter.flush();

        fileWriter.write(98);

        fileWriter.write("66");

        fileWriter.close();
    }
}
